package com.dimeng.utils;

import org.junit.Test;

import android.os.Environment;


/**
 * @author write by ccn<br>
 * <b>helloandroid100@gmail.com</b>
 * @version 0.1;2012-5-7<br>
 * descrition:系统使用的常量集合
 */
public class Constant {
	public final static String SDCARD_PATH = Environment.getExternalStorageDirectory().getAbsolutePath();
	/**换行符，支持跨平台**/
	public final static String NEW_LINE = System.getProperty("line.separator")+"\n";
	/**字符编码**/
	public final static String CHARSET_GBK = "GBK";
	
	public final static String CHARSET_UTF8 = "UTF-8";
	
	public final static String HTML = ".html";
	
	/**搜索的url前一部份**/
	public final static String SEARCH_PREFIX = "http://search.taojindi.com/"; 
	
	public final static String HOST_URL = "http://www.taojindi.com/mobile/";
//	public final static String HOST_URL = "http://10.0.2.2:8080/mobile/";

	/**资讯主页**/
	public final static String INFO_URL = "http://info.taojindi.com/";
	
	public final static String CHECK_UPDATE_ACTION = HOST_URL+"version.do";
	
	public final static String STAT_VISIT_URL = HOST_URL+"stat_visit.do";
	
	public final static String 	LOACL_APK_SAVE_PATH = Constant.SDCARD_PATH + "/taojindi/apk/";
	/**图片文件缓存的目录**/
	public final static String IMG_CACHE_PATH = Constant.SDCARD_PATH + "/taojindi/cache/img/";
	
	/**字符文件缓存的目录**/
	public final static String TXT_CACHE_PATH = Constant.SDCARD_PATH + "/taojindi/cache/txt/";
	
	public final static String APP_ID_FILE = Constant.SDCARD_PATH + "/taojindi/cache/appId.txt";
	
	/**正在保存中的文件后缀名**/
	public final static String 	ING = ".ing";
	
	/**图片文件缓存占用的最大存储空间**/
	public final static long MAX_IMG_CACHE_STORAGE = 1024 * 1024 * 50 ;//50M
	
	/**字符文本文件缓存占用的最大存储空间**/
	public final static long MAX_TXT_CACHE_STORAGE = 1024 * 1024 * 30 ;//30M
	
	
	/**每页的记录数**/
	public final static int PAGE_SIZE = 4;
	
	public final static String NO_UPDATE_DATA = "无数据更新"; 
	
	public final static String NET_ERROR = "无法加载数据,请检查您的网络连接。";
	
	public final static String LOADING = "数据加载中...";
	
	public final static String APP_PAKAGE = "com.dimeng";
	
	public final static int CROP_REQUEST_CODE = 1;
	
	@Test
	public void print(){
		String NEW_LINE = System.getProperty("line.separator")+"\n";
		System.out.println(NEW_LINE);
	}
}
